package com.spring.cloud.seata.api;

import com.spring.cloud.seata.vo.ResultVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;

/**
 * @author zhangtengfei
 * @date 2021/10/18 11:25
 */
@FeignClient(value = "nacos-seata-account-server")
public interface RemoteAccountService {

    /**
     * 扣减账户余额
     * 
     * @param userId
     * @param money
     * @return
     */
    @PostMapping("/account/reduceBalance")
    ResultVO reduceBalance(@RequestParam("userId") Integer userId, @RequestParam("money") BigDecimal money);
}
